* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  width: 100%;
  color: #333;
  overflow-x: hidden;
}

.app {
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

/* Header Styles */
.header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #667eea;
  text-decoration: none;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 500px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  color: #666;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 2px solid #e1e5e9;
  border-radius: 50px;
  font-size: 1rem;
  background: #fff;
  transition: all 0.3s ease;
  outline: none;
}

.search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Main Content */
.main {
  width: 100%;
  margin: 0;
  padding: 10px;
  box-sizing: border-box;
}

/* Filters */
.filters {
  margin-bottom: 2rem;
}

.category-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-icon {
  width: 1.2rem;
  height: 1.2rem;
  color: #666;
}

.category-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.category-btn {
  padding: 0.5rem 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 25px;
  background: #fff;
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.category-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-1px);
}

.category-btn.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Video Grid - 4 videos per row */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.video-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 60%; /* 0.8 height-to-width ratio (4:5 aspect ratio) */
  overflow: hidden;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-overlay {
  opacity: 1;
}

.play-icon {
  width: 3rem;
  height: 3rem;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 0.75rem;
  backdrop-filter: blur(10px);
}

.video-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.duration-icon {
  width: 0.75rem;
  height: 0.75rem;
}

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 0.9rem;
  font-weight: 400;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-channel {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.video-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #888;
}

.video-views {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.views-icon {
  width: 0.875rem;
  height: 0.875rem;
}

.video-date {
  font-size: 0.8rem;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.no-results p {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .video-grid {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
  }
  
  .video-admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .search-container {
    max-width: 100%;
  }

  .main {
    padding: 1rem;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
  }

  .category-filters {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .category-buttons {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .category-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .logo-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* Smooth animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-card {
  animation: fadeIn 0.5s ease-out;
}

.video-card:nth-child(even) {
  animation-delay: 0.1s;
}

.video-card:nth-child(3n) {
  animation-delay: 0.2s;
}


/* Dashboard Styles - Updated to match video list style */
.dashboard {
  background: #fff;
  color: #333;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.dashboard-icon {
  width: 2rem;
  height: 2rem;
  color: #667eea;
}

.dashboard-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #2d3748;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Switch Account Button */
.switch-account-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  margin-left: 1rem;
}

.switch-account-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.switch-account-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.switch-account-btn svg {
  transition: transform 0.3s ease;
}

.switch-account-btn:hover svg {
  transform: rotate(-15deg);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 8px 8px 0 0;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-svg {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.stat-content {
  flex: 1;
}

.stat-title {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #333;
}

.stat-change {
  font-size: 0.875rem;
  font-weight: 500;
}

.stat-change.up {
  color: #4ade80;
}

.stat-change.down {
  color: #f87171;
}

.growth-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e1e5e9;
}

.growth-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
}

.growth-metrics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.growth-metric {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.metric-label {
  flex: 1;
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
}

.metric-bar {
  flex: 2;
  height: 8px;
  background: #e1e5e9;
  border-radius: 4px;
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.metric-value {
  flex: 0 0 3rem;
  text-align: right;
  font-weight: 600;
  font-size: 0.875rem;
  color: #333;
}

/* Navigation Styles */
.navigation {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: #667eea; /* 改为蓝色文字 */
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s;
  font-weight: 500;
  border: 2px solid transparent;
}

.nav-link:hover {
  background-color: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}

.nav-link.active {
  background-color: #667eea;
  color: white;
  border-color: #667eea;
}

/* Filter Row Styles */
.filter-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.filter-row .search-container {
  flex: 1;
  max-width: 400px;
  min-width: 250px;
}

.filter-row .category-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .filter-row .search-container {
    max-width: none;
  }
}

/* Pagination Styles - 优化版本 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  gap: 1rem;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 0.95rem;
  color: #4a5568;
  font-weight: 500;
  margin-right: auto;
  min-width: 120px;
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #2d3748;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #667eea;
  background: linear-gradient(135deg, #f7f9ff 0%, #edf2f7 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.pagination-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  color: #718096;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .pagination {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .pagination-info {
    margin-right: 0;
    text-align: center;
    order: 3;
    width: 100%;
  }
  
  .pagination-controls {
    order: 2;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .pagination-btn {
    min-width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  
  .jump-to-page {
    margin-left: 0;
    margin-top: 12px;
    justify-content: center;
    width: 100%;
  }
  
  .jump-input {
    width: 50px;
  }
}

@media (max-width: 480px) {
  .pagination-controls {
    gap: 0.25rem;
  }
  
  .pagination-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    font-size: 0.8rem;
  }
  
  .pagination-ellipsis {
    min-width: 28px;
    height: 28px;
  }
  
  .jump-to-page {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .jump-label {
    font-size: 13px;
  }
  
  .jump-input {
    width: 40px;
    padding: 4px 6px;
  }
  
  .jump-btn {
    padding: 4px 8px;
    font-size: 13px;
  }
}

/* 分页跳转功能样式 */
.jump-to-page {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.jump-label {
  font-size: 14px;
  color: #6c757d;
  white-space: nowrap;
}

.jump-input {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
}

.jump-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.jump-btn {
  padding: 6px 12px;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.jump-btn:hover:not(:disabled) {
  background-color: #5a6fd8;
}

.jump-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* Video Player Styles */
.video-player-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.video-player-container {
  background: #fff;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-player-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.video-player-close:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.video-player-close svg {
  color: white;
  width: 24px;
  height: 24px;
}

.video-player-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.video-player {
  width: 100%;
  max-height: 70vh;
  background: #000;
}

.video-player-info {
  padding: 20px;
  background: #fff;
}

.video-player-title {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}

.video-player-channel {
  color: #666;
  margin: 0 0 15px 0;
  font-size: 0.9rem;
}

.video-player-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.85rem;
  color: #888;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .video-player-container {
    max-width: 95vw;
    max-height: 95vh;
    width: 100%;
  }
  
  .video-player-close {
    width: 32px;
    height: 32px;
    top: 8px;
    right: 8px;
    padding: 8px;
  }
  
  .video-player-close svg {
    color: white;
    width: 18px;
    height: 18px;
  }
  
  .video-player-info {
    padding: 15px;
  }
}

/* 在文件末尾添加图片网格样式 */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.image-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.image-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.image-thumbnail {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 60%;
  overflow: hidden;
}

.image-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.image-card:hover .image-thumbnail img {
  transform: scale(1.05);
}

.image-info {
  padding: 1rem;
}

.image-title {
  font-size: 0.9rem;
  font-weight: 400;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.image-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #888;
}

.image-date {
  font-size: 0.8rem;
}

/* 响应式设计 */
.image-placeholder {
  width: 100%;
  height: 180px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 14px;
}

@media (max-width: 1400px) {
  .image-grid {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
  }
}

@media (max-width: 1024px) {
  .image-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
  
  .video-admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .image-grid {
    grid-template-columns: 1fr;
  }
}

.image-grid-page {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.image-grid-page h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

/* 后台管理页面样式 */
.admin-page {
  padding: 20px;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  margin: 0;
}

/* 视频管理页面独立样式 */
.video-admin-page {
  background: none;
  min-height: 100vh;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  overflow-x: hidden;
}

.video-admin-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* 配置管理页面样式 */
.config-page {
  background: none;
  min-height: 100vh;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
}

/* 配置管理和用户管理页面统一容器样式 */
.admin-content-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.video-admin-controls-stats-container {
  display: flex;
  flex-direction: column;
  gap: 4px; /* 从8px减少到4px */
  margin-bottom: 6px; /* 从12px减少到6px */
}/* 视频管理页面筛选控件样式优化 */
.video-filter-controls-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: 2px solid rgba(226, 232, 240, 0.8); /* 调整为2px边框，与导航栏一致 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.video-filter-controls-container::-webkit-scrollbar {
  display: none; /* 隐藏滚动条 */
}

.video-filter-controls {
  display: flex;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap; /* 改为wrap以允许换行 */
  justify-content: flex-start;
  min-width: max-content; /* 确保内部元素不会被压缩 */
}

/* 配置管理页面样式 */
.config-page {
  padding: 0;
  min-height: 100vh;
  box-sizing: border-box;
  margin: 0;
}

.config-page .page-header {
  margin-bottom: 30px;
  text-align: center;
}

.config-page .page-header h2 {
  font-size: 28px;
  color: #2d3748;
  margin-bottom: 10px;
}

.config-page .page-header p {
  color: #718096;
  font-size: 16px;
}

/* 后台管理系统样式 */
.admin-dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0.1rem;
  box-sizing: border-box;
  overflow-x: hidden; /* 防止水平溢出 */
}

.admin-header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.admin-nav-top {
  flex: 1;
  display: flex;
  justify-content: center;
}

.admin-nav-center {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 2px solid #e1e5e9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.back-btn:hover {
  color: #1890ff;
  border-color: #1890ff;
}

.admin-title {
  color: #667eea;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.admin-sidebar {
  width: 250px;
  background: #f6f8fa;
  border-right: 1px solid #e1e4e8;
  padding: 120px 0 20px 20px; /* 从100px改为120px，为新的header高度留出空间 */
  position: fixed;
  top: 80px; /* 从80px改为80px，保持在header下方 */
  bottom: 0;
  left: 0;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-nav-link {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.admin-nav-link:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  transform: translateY(-1px);
}

.admin-nav-link.active {
  background: #667eea;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.admin-content {
  padding: 10px;
  min-height: calc(100vh - 64px);
}

.admin-search {
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  width: 300px;
}

.admin-search .search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}

.video-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 0;
  width: 100%;
  padding: 0.25rem 0.05rem; /* 从0.5rem 1rem减少到0.25rem 0.75rem */
  box-sizing: border-box;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-card h3 {
  color: #718096;
  font-size: 12px;
  margin-bottom: 0;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #4299e1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.video-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 使用auto-fit代替固定列数 */
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 0;
}

.video-admin-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 
    0 2px 12px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.2s ease;
}

.video-admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: rgba(203, 213, 224, 0.9);
}

.video-admin-info h4 {
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

.video-filename {
  color: #718096;
  font-size: 13px;
  margin-bottom: 6px;
  word-break: break-all;
  line-height: 1.4;
}

.video-time, .video-duration, .video-objects {
  color: #4a5568;
  font-size: 13px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.admin-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
  justify-content: center;
}

.delete-btn {
  background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
  color: #c53030;
  box-shadow: 0 2px 8px rgba(254, 178, 178, 0.3);
}

.delete-btn:hover {
  background: linear-gradient(135deg, #feb2b2 0%, #fc8181 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(254, 178, 178, 0.4);
}

.edit-btn {
  background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
  color: #2c5282;
  box-shadow: 0 2px 8px rgba(190, 227, 248, 0.3);
}

.edit-btn:hover {
  background: linear-gradient(135deg, #90cdf4 0%, #63b3ed 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(190, 227, 248, 0.4);
}

/* 表格容器样式 */
.mapping-table-container,
.users-table-container {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid rgba(226, 232, 240, 0.8); /* 调整为2px边框，与导航栏一致 */
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.mapping-table,
.users-table {
  width: 100%;
  border-collapse: collapse;
}

.mapping-table th,
.mapping-table td,
.users-table th,
.users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e1e4e8;
}

.mapping-table th,
.users-table th {
  background: #f6f8fa;
  font-weight: 600;
  color: #24292e;
}

/* 表单元素样式 */
select, input {
  padding: 8px 12px;
  border: 1px solid #d1d5da;
  border-radius: 6px;
  font-size: 14px;
}

button {
  padding: 8px 16px;
  border: 1px solid #d1d5da;
  border-radius: 6px;
  background: #f6f8fa;
  cursor: pointer;
  font-size: 14px;
}

button:hover {
  background: #eaecef;
}

button.danger {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

button.danger:hover {
  background: #c82333;
}

/* 添加用户区域 */
.add-user-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: end;
}

.add-user-section h3 {
  margin: 0;
  margin-right: auto;
}

/* 登录页面样式 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

/* 用户信息和退出按钮样式 */
.user-info {
  color: #fff;
  margin-left: 1rem;
  font-size: 0.9rem;
}

.logout-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  margin-left: 1rem;
}

.logout-btn:hover {
  text-decoration: underline;
}

/* 登录按钮样式 */
.login-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 12px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-size: 1.2rem;
}

.login-form {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-form h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

.login-form button {
  width: 100%;
  padding: 0.75rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.login-form button:hover {
  background: #5a67d8;
}

.login-form button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.error-message {
  color: #e53e3e;
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #fed7d7;
  border-radius: 5px;
}

.register-link {
  text-align: center;
  margin-top: 1rem;
  color: #666;
}

.register-link a {
  color: #667eea;
  text-decoration: none;
}

.register-link a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #667eea;
  text-decoration: none;
  margin-bottom: 1rem;
}

.back-link:hover {
  text-decoration: underline;
}



/* 筛选控件和统计信息容器 - 统一美化版 */
.admin-controls-stats-container {
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 18px;
  box-shadow: 
    0 8px 32px rgba(102, 126, 234, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 20px;
}

.filter-controls-container {
  margin-bottom: 0;
  width: 100%;
  padding: 1.25rem 1.5rem 0 1.5rem;
  box-sizing: border-box;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  overflow-x: auto;
}

/* 搜索框样式优化 */
.filter-group:first-child .search-input {
  width: 140px;
  padding: 0.5rem 0.6rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.75rem;
  height: 32px;
  transition: all 0.2s ease;
}

.filter-group:first-child .search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 标签样式优化 */
.filter-label-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a5568;
  white-space: nowrap;
}

.filter-label-icon {
  color: #667eea;
  flex-shrink: 0;
}

.filter-controls:hover {
  box-shadow: 
    0 12px 40px rgba(102, 126, 234, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  border-color: rgba(203, 213, 224, 0.9);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-group:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(203, 213, 224, 0.8);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.filter-label-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 60px;
}

.filter-label-wrapper .filter-label-icon {
  color: #667eea;
  transition: color 0.2s ease;
  width: 14px;
  height: 14px;
}

.filter-group:hover .filter-label-wrapper .filter-label-icon {
  color: #5a67d8;
}

.filter-label {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.8rem;
  white-space: nowrap;
  margin: 0;
  letter-spacing: 0.01em;
}

.date-filter {
  display: flex;
  gap: 0.625rem;
  align-items: center;
}

/* 时间筛选器样式优化 */
.date-filter {
  display: flex;
  gap: 0.3rem;
}

.date-filter .filter-select {
  min-width: 70px;
  padding: 0.4rem 0.5rem;
  font-size: 0.7rem;
  height: 28px;
}

/* 通道筛选器样式优化 */
.filter-group:nth-child(3) .filter-select {
  min-width: 80px;
  padding: 0.4rem 0.5rem;
  font-size: 0.7rem;
  height: 28px;
}

.filter-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 
    0 0 0 4px rgba(102, 126, 234, 0.1),
    0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-1px);
}

.filter-select:hover:not(:disabled) {
  border-color: #cbd5e0;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-actions {
  margin-left: auto;
}

/* 重置按钮样式优化 */
.filter-actions {
  margin-left: auto;
  align-self: end;
}

.reset-filters-btn {
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  color: #4a5568;
  font-size: 0.65rem;
  font-weight: 600;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.reset-filters-btn:hover {
  background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
  border-color: #cbd5e0;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reset-filters-btn:hover {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border-color: #cbd5e0;
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(102, 126, 234, 0.1);
  color: #2d3748;
}

.reset-filters-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.reset-filters-btn .reset-icon {
  transition: transform 0.3s ease;
  width: 12px;
  height: 12px;
}

.reset-filters-btn:hover .reset-icon {
  transform: rotate(180deg);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .filter-controls {
    gap: 0.8rem;
  }
  
  .filter-group {
    padding: 0.4rem 0.6rem;
    gap: 0.3rem;
  }
  
  .filter-group:first-child .search-input {
    width: 120px;
  }
  
  .date-filter .filter-select {
    min-width: 60px;
  }
  
  .filter-group:nth-child(3) .filter-select {
    min-width: 70px;
  }
}

@media (max-width: 768px) {
  .filter-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
    border-radius: 14px;
  }
  
  .filter-group {
    flex-direction: row;
    align-items: center;
    padding: 0.8rem;
    gap: 0.5rem;
  }
  
  .date-filter {
    flex-direction: row;
  }
  
  .filter-actions {
    margin-left: 0;
    width: 100%;
  }
  
  .reset-filters-btn {
    justify-content: center;
    width: 100%;
    padding: 0.5rem 1rem;
    height: 32px;
    font-size: 0.7rem;
  }
  
  .video-filter-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select.search-input {
    width: 100% !important;
  }
  
  .video-admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .filter-controls-container {
    padding: 1rem 1rem 0 1rem;
  }
  
  .filter-controls {
    padding: 0.8rem;
    gap: 0.8rem;
  }
  
  .filter-group {
    padding: 0.6rem;
    gap: 0.4rem;
  }
  
  .filter-group:first-child .search-input {
    width: 100px;
    font-size: 0.7rem;
  }
  
  .date-filter .filter-select {
    min-width: 50px;
    font-size: 0.65rem;
  }
  
  .filter-group:nth-child(3) .filter-select {
    min-width: 60px;
    font-size: 0.65rem;
  }
  
  .video-admin-grid {
    grid-template-columns: 1fr;
  }
  
  .video-admin-content {
    padding-top: 15px;
  }
  
  .video-admin-page {
    padding: 10px;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .admin-nav-center {
    width: 100%;
    justify-content: center;
  }
  
  .admin-nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* 筛选统计卡片样式增强 */
.video-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.stat-card h3 {
  color: #718096;
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 24px;
  font-weight: bold;
  color: #4299e1;
}

/* 筛选结果统计卡片特定样式 */
.stat-card.filter-result::before {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.stat-card.filter-result .stat-number {
  color: #059669;
}

/* 时间筛选卡片特定样式 */
.stat-card.time-filter::before {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.stat-card.time-filter .stat-number {
  color: #2563eb;
}

/* 通道筛选卡片特定样式 */
.stat-card.channel-filter::before {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.stat-card.channel-filter .stat-number {
  color: #d97706;
}

/* 加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card:nth-child(2) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.2s;
}

.stat-card:nth-child(4) {
  animation-delay: 0.3s;
}

/* 摄像头映射管理器样式 */
.camera-mapping-manager {
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  box-sizing: border-box;
  overflow: hidden;
}

/* 配置管理页面的摄像头映射管理器样式 */
.camera-mapping-manager > div:first-child {
  border: none !important; /* 删除配置管理页面的外边框 */
  box-shadow: none !important;
}

/* 用户管理页面的主容器样式 */
.user-management-container {
  border: none !important; /* 删除用户管理页面的外边框 */
  box-shadow: none !important;
}

/* 确保所有表单元素和表格内元素的边框宽度统一为2px */
.camera-mapping-manager select,
.camera-mapping-manager input,
.camera-mapping-manager button,
.UserManagementPage select,
.UserManagementPage input,
.UserManagementPage button {
  border-width: 2px !important; /* 调整为2px边框，与导航栏一致 */
}

.title-and-config-container {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #e1e4e8;
  height: 40px;
  box-sizing: border-box;
}

.config-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  box-sizing: border-box;
}

.config-selector label {
  white-space: nowrap;
  color: #343a40;
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  margin: 0;
  height: 24px;
}

.config-selector select {
  padding: 0 8px;
  border: 1px solid #ced4da;
  border-radius: 3px;
  background-color: #fff;
  font-size: 14px;
  min-width: 120px;
  height: 24px;
  box-sizing: border-box;
  line-height: 24px;
  margin: 0;
}

/* 确保文字可见性 */
.mapping-editor {
  padding: 8px 12px;
  margin: 0;
}

.mapping-header h3 {
  margin: 0;
  font-size: 14px;
  color: #24292e;
  font-weight: 600;
}

.config-and-mapping-container {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  max-width: none !important;
}

.mapping-editor {
  flex: 1 !important;
  min-width: 0 !important;
}

.mappings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 15px;
  margin-bottom: 2rem;
}

.mapping-item {
  padding: 8px;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  background-color: #fafbfc;
}

.mapping-item div:first-child {
  margin-bottom: 6px;
  font-weight: bold;
  color: #24292e;
  font-size: 13px;
}

.mapping-item span {
  font-weight: 500;
  min-width: 100px;
  white-space: nowrap;
}

.mapping-item select {
  flex: 1;
  min-width: 120px;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

.save-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.save-btn:hover {
  background: #5a6fd8;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.25rem;
  }
  
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group label {
    margin-bottom: 0.5rem;
  }
  
  .reset-filters-btn {
    margin-left: 0;
    width: 100%;
  }
  
  .video-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1.25rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }

  .config-selector {
    flex-direction: column;
    height: auto;
    gap: 4px;
  }
  
  .config-selector label,
  .config-selector select {
    height: auto;
    line-height: normal;
  }
  
  .mappings-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .filter-panel {
    padding: 1rem;
    border-radius: 12px;
  }
  
  .filter-select {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
  }
  
  .stat-card {
    border-radius: 12px;
  }
}

/* 模态窗口样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  width: 730px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.video-container {
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.video-container img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
    padding: 15px;
  }
  
  .video-container img {
    max-height: 60vh;
  }
}

/* RTSP视频流播放器样式 */
.video-container video {
  width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  background-color: #000;
}

.video-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.5rem;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.video-controls button {
  padding: 0.5rem 1rem;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.video-controls button:hover {
  background-color: #5a6fd8;
}

.video-status {
  font-size: 0.9rem;
  color: #666;
}

.video-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.video-error p {
  margin: 0.5rem 0;
  color: #666;
}

.video-error button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: #667eea;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.video-error button:hover {
  background-color: #5a6fd8;
}

/* 流协议选择器样式 */
.stream-protocol-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-radius: 6px;
}

.stream-protocol-selector label {
  font-weight: 600;
  color: #333;
  margin: 0;
}

.stream-protocol-selector select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  font-size: 0.9rem;
}

.protocol-info {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
}

.video-controls .stream-type {
  margin-left: auto;
  font-size: 0.8rem;
  color: #888;
  background-color: #f0f0f0;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}

/* 响应式流协议选择器 */
@media (max-width: 768px) {
  .stream-protocol-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .stream-protocol-selector select {
    width: 100%;
  }
  
  .video-controls .stream-type {
    margin-left: 0;
    align-self: flex-start;
  }
}